﻿    <div class="page-heading">
		<h1>{editTitle}</h1>
</div>
<div class="page-content">
    <div class="msg-box hidden" id="msg-newsedit">
        <span class="msg">{editTitle} thành công.</span>
    </div>
    <div class="error-box hidden" id="err-newsedit">
    </div>
    <form id="form" method="post" enctype="multipart/form-data">
        <input type="hidden" name="submit" value="true" />
        <input type="hidden" name="Id" value="{edit_id}" />
        <div class="admin-row">
            <div class="left"><label>Danh mục tin tức</label></div>
            <div class="right">
                <select id="cat_select" name="CatId">
                    <option value="0">-- Chọn danh mục tin --</option>
                    <fly:list data="view">
                        <option id="opt_{view.id}" value="{view.id}">{view.name}</option>
                    </fly:list>
                </select>
            </div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Title</label></div>
            <div class="right"><input class="input" name="Name" value="{name}" type="text" /></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Tiêu đề</label></div>
            <div class="right"><input class="input" name="ViName" value="{viName}" type="text" /></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Thời gian diễn ra</label></div>
            <div class="right"><input class="input" name="eventTime" id="eventTime" value="{eventTime}" type="text" /></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Hình ảnh</label></div>
            <div class="right">
                <img class="img_news" alt="img" src="{ResourceUrl}/{image}"/>
                <input class="input" name="Image" type="file" />
            </div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Description</label></div>
            <div class="right"><textarea name="Description">{Desc}</textarea></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Giới thiệu</label></div>
            <div class="right"><textarea name="ViDescription">{ViDesc}</textarea></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Detail</label></div>
            <div class="right"><textarea name="Detail" id="news_detail">{Detail}</textarea></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Chi tiết</label></div>
            <div class="right"><textarea name="ViDetail" id="news_videtail">{ViDetail}</textarea></div>
        </div>
        <div class="admin-row">
            <div class="left">&nbsp;</div>
            <div class="right"><input type="checkbox" name="Publish" value="1" {IsChecked}/><label>&nbsp;Đưa lên trang chủ</label></div>
        </div>
        <div class="admin-row">
            <div class="left">&nbsp;</div>
            <div class="right"><input type="checkbox" name="IsFeatured" value="1" {IsFeaturedChecked}/><label>&nbsp;Đưa vào danh sách tin tức tiêu biểu</label></div>
        </div>
        <div class="admin-row">
            <div class="left">&nbsp;</div>
            <div class="right">
                <input class="button" type="submit" value="Lưu lại" />
                <a class="button" onclick="location='{BaseUrl}/admin/news'" >Hủy bỏ</a>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        $('#cat_select').val({catid});
        $('#news_detail').cleditor({ width: "100%", height: "500px", docCSSFile: "{ResourceUrl}/css/editor.css" });
        $('#news_videtail').cleditor({ width: "100%", height: "500px", docCSSFile: "{ResourceUrl}/css/editor.css" });
        $('#eventTime').datetime({userLang: 'en', americanMode: true});
    });
</script>